<template>
  <div>
    <div>
      <button @click="jump('index')">去首页</button>
      <button @click="jump('login')">去登录</button>
    </div>
    <router-view></router-view>
  </div>
</template>
<script setup>
import { useRouter } from "vue-router";

let route = useRouter();
const jump = function (str) {
  route.push({ name: str });
};
</script>

<style scoped>
.tab-index {
  display: inline-block;
  width: 100px;
  height: 30px;
  margin: 0, 50px;
  color: aquamarine;
}
</style>